#include <stdio.h>

#ifndef char_t

#ifdef _UNICODE
	typedef wchar_t char_t;
	#define STRLEN(x)     wcslen(x)
	#define STRCMP(x, y)  wcscmp(x, y)
	#define STRCPY(x, y)  wcscpy(x, y)
	#define STRNCPY(x,y,z) wcsncpy(x, y, z)
	#define STRCOLL(x, y) wcscoll(x, y)
	#define STRNCMP(x,y,z) wcsncmp(x, y, z)
	#define STRLITERAL(x) (wchar_t*)L##x
	#define PRINTF        wprintf
	#define FPRINTF       fwprintf
	#ifndef _T
	#define _T(x) L##x
	#endif
#else
	typedef char char_t;
	#define STRLEN(x)     strlen(x)
	#define STRCMP(x, y)  strcmp(x, y)
	#define STRCPY(x, y)  strcpy(x, y)
	#define STRNCPY(x,y,z) strncpy(x, y, z)
	#define STRCOLL(x, y) strcoll(x, y)
	#define STRNCMP(x,y,z) strncmp(x, y, z)
	#define PRINTF        printf
	#define FPRINTF       fprintf
	#define SPRINTF       sprintf
	#define SPRINTF_BUFFER(buf) buf
	#define VFPRINTF      vfprintf
	#define FSCANF        fscanf
	#define SSCANF        sscanf
	#define GETC(x)       getc(x)
	#define UNGETC(x, y)  ungetc(x, y)
	#define TOLOWER(x)    tolower((x) & 0xFF)
	#define TOUPPER(x)    toupper((x) & 0xFF)
	#define ISALNUM(x)    isalnum((x) & 0xFF)
	#define STRSTR(x, y)  strstr(x, y)
	#define STRXFRM(x,y,z) strxfrm(x, y, z)
	#define STRFTIME(a,b,c,d) strftime(a,b,c,d)
	#ifndef _T
	#define _T(x) x
	#endif
#endif
#endif